import router from "@/router";
import NProgress from "@/utils/nprogress";

export function setupPermission() {
  // 白名单
  // const whiteList: string[] = ["/login"];

  router.beforeEach(async (to, from, next) => {
    NProgress.start();
    next();
    NProgress.done();
  });

  router.afterEach(() => {
    NProgress.done();
  });
}
